﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Printing;
using ApplicationLibrary.ExtendedControls;
using ApplicationLibrary.SqlConnector;
using Plumber.Masters.ModuleData;

namespace Plumber.Sales.Preferences
{
    public partial class SalesPreferencePanel : SalesPreferencePanelNoVis
    {
        private RRMasterByMasterType rRMasterByMasterType = new RRMasterByMasterType();
        public SalesPreferencePanel()
            : base()
        {
            InitializeComponent();
        }
        public SalesPreferencePanel(string appName)
            : base(appName)
        {
            InitializeComponent();
            ButtonText = Properties.Resources.T_Sales;
            ButtonImage = Properties.Resources.B_Sales;
        }

        protected override void OnAttachData()
        {
        }

        protected override void OnBindData()
        {
            BindControl(ckbLockSales, "LockSalesPayed", "Checked");
        }
    }

    #region SalesPreferencePanelNoVis
    public partial class SalesPreferencePanelNoVis : ApplicationLibrary.Preferences.GenericPreferencePanel<SalesPref>
    {
        public SalesPreferencePanelNoVis()
        { }

        public SalesPreferencePanelNoVis(string appName)
            : base(appName, null)
        {
        }
    } 
    #endregion

    [Serializable()]
    public class SalesPref
    {
        public bool LockSalesPayed { get; set; }
    }

}
